<% stylesheet 'backend/jstree/default/style.min' %>
<% javascript 'backend/jstree/jstree.min' %>
<% javascript 'backend/tree' %>
<% javascript 'backend/pages' %>
<%= render 'backend/breadcrumbs' %>

<p class="text-xs-right">
  <%= link_to t('b.add'), new_backend_page_path, class: 'btn btn-primary btn-sm' %>
</p>

<div class="card">
  <div class="card-block">
    <% if @pages.any? %>
      <div id="pages-tree" data-source="<%= backend_pages_path(format: :json) %>"></div>
    <% else %>
      <p><%= t 'b.msg.no_items' %></p>
    <% end %>
  </div>
</div>
